<!DOCTYPE html>
<html>
<head>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>

<h1 id="title">数组测试</h1>

<script type="text/javascript">
    var s = "fooStyleCss";
    s = s.replace(/([A-Z])/g,"-$1").toLowerCase();
    console.log(s);
    var s1 = "foo-style-css";


    s1 = s1.replace(/\-(\w)/g, function(all, letter){
        return letter.toUpperCase();
    });
    console.log(s1);

</script>
</body>
</html>

